home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / a_man / cat1 / mkfs_xfs.z / mkfs_xfs
Encoding:
Text File  |  2002-10-03  |  25.5 KB  |  463 lines

  1.  
  2.  
  3.  
  4. mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      mkfs_xfs - construct an XFS filesystem
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      mmmmkkkkffffssss____xxxxffffssss [ ----bbbb subopt=value ] [ ----dddd subopt[=value] ] [ ----iiii subopt=value ]
  13.           [ ----llll subopt[=value] ] [ ----nnnn subopt[=value] ] [ ----pppp protofile ] [ ----qqqq ]
  14.           [ ----rrrr subopt[=value] ] [ ----CCCC ] device
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _m_k_f_s__x_f_s constructs an XFS filesystem by writing on a special file using
  18.      the values found in the arguments of the command line.  It is invoked
  19.      automatically by _m_k_f_s(1M) when _m_k_f_s is given the ----tttt xxxxffffssss option, options
  20.      that are specific to XFS, or no options that are specific to EFS.
  21.  
  22.      In its simplest (and most commonly used form), the size of the filesystem
  23.      is determined from the disk driver.  As an example, to make a filesystem
  24.      on partition 7 (all of the useable portion of an option drive, normally)
  25.      on drive 7 on SCSI bus 0, with an internal log, use:
  26.  
  27.                mkfs_xfs /dev/dsk/dks0d7s7
  28.  
  29.  
  30.      XFS filesystems are composed of a data section, a log section, and
  31.      optionally a real-time section.  This separation can be accomplished
  32.      using the XLV volume manager to create a multi-subvolume volume, or by
  33.      embedding an _i_n_t_e_r_n_a_l log section in the data section.  In the former
  34.      case, the _d_e_v_i_c_e name is supplied as the final argument.  In the latter
  35.      case a disk partition or XLV logical volume without a log subvolume can
  36.      contain the XFS filesystem, which is named by the ----dddd nnnnaaaammmmeeee====_s_p_e_c_i_a_l option
  37.      or by the final argument.
  38.  
  39.      Each of the _s_u_b_o_p_t=_v_a_l_u_e elements in the argument list above can be given
  40.      as multiple comma-separated _s_u_b_o_p_t=_v_a_l_u_e suboptions if multiple
  41.      suboptions apply to the same option.  Equivalently, each main option can
  42.      be given multiple times with different suboptions.  For example, ----llll
  43.      iiiinnnntttteeeerrrrnnnnaaaallll,,,,ssssiiiizzzzeeee====1111000000000000bbbb and ----llll iiiinnnntttteeeerrrrnnnnaaaallll ----llll ssssiiiizzzzeeee====1111000000000000bbbb are equivalent.
  44.  
  45.      In the descriptions below, sizes are given in bytes, blocks, kilobytes,
  46.      or megabytes.  Sizes are treated as hexadecimal if prefixed by 0x or 0X,
  47.      octal if prefixed by 0, or decimal otherwise.  If suffixed with bbbb then
  48.      the size is converted by multiplying it by the filesystem's block size.
  49.      If suffixed with kkkk then the size is converted by multiplying it by 1024.
  50.      If suffixed with mmmm then the size is converted by multiplying it by
  51.      1048576 (1024 * 1024).  If suffixed with gggg then the size is converted by
  52.      multiplying it by 1073741824 (1024 * 1024 * 1024).
  53.  
  54.      ----bbbb   Block size options.
  55.  
  56.           This option specifies the fundamental block size of the filesystem.
  57.           The valid suboptions are:  lllloooogggg====_v_a_l_u_e and ssssiiiizzzzeeee====_v_a_l_u_e; only one can be
  58.           supplied.  The block size is specified either as a base two
  59.           logarithm value with lllloooogggg====, or in bytes with ssssiiiizzzzeeee====.  The default
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))
  71.  
  72.  
  73.  
  74.           value is 4096 bytes (4 KB).  The minimum value for block size is
  75.           512; the maximum is 65536 (64 KB).
  76.  
  77.      ----dddd   Data section options.
  78.  
  79.           These options specify the location, size, and other parameters of
  80.           the data section of the filesystem.  The valid suboptions are:
  81.           aaaaggggccccoooouuuunnnntttt====_v_a_l_u_e, aaaaggggssssiiiizzzzeeee====_v_a_l_u_e, ffffiiiilllleeee[====_v_a_l_u_e], nnnnaaaammmmeeee====_v_a_l_u_e, ssssiiiizzzzeeee====_v_a_l_u_e,
  82.           ssssuuuunnnniiiitttt====_v_a_l_u_e, sssswwwwiiiiddddtttthhhh====_v_a_l_u_e, ssssuuuu====_v_a_l_u_e, sssswwww====_v_a_l_u_e, and
  83.           uuuunnnnwwwwrrrriiiitttttttteeeennnn[====_v_a_l_u_e].
  84.  
  85.           The aaaaggggccccoooouuuunnnntttt suboption is used to specify the number of allocation
  86.           groups.  The data section of the filesystem is divided into
  87.           allocation groups to improve the performance of XFS.  More
  88.           allocation groups imply that more parallelism can be achieved when
  89.           allocating blocks and inodes.  The minimum allocation group size is
  90.           16 MB; the maximum size is just under 4 GB.  The data section of the
  91.           filesystem is divided into _a_g_c_o_u_n_t allocation groups (default value
  92.           8, unless the filesystem is smaller than 128 MB or larger than 8
  93.           GB).  Setting _a_g_c_o_u_n_t to a very large number should be avoided,
  94.           since this causes an unreasonable amount of CPU time to be used when
  95.           the filesystem is close to full.
  96.  
  97.           The aaaaggggssssiiiizzzzeeee suboption is an alternative to using aaaaggggccccoooouuuunnnntttt.... The
  98.           argument provided to aaaaggggssssiiiizzzzeeee is the desired size of the allocation
  99.           group expressed in bytes (usually using the mmmm or gggg suffixes).  This
  100.           value must be a multiple of the filesystem block size, and must be
  101.           at least 16MB, and no more than 4GB, and may be automatically
  102.           adjusted to properly align with the stripe geometry.  The aaaaggggccccoooouuuunnnntttt
  103.           suboption and the aaaaggggssssiiiizzzzeeee suboption are mutually exclusive.
  104.  
  105.           The nnnnaaaammmmeeee suboption can be used to specify the name of the special
  106.           file containing the filesystem.  In this case, the log section must
  107.           be specified as iiiinnnntttteeeerrrrnnnnaaaallll (with a size, see the ----llll option below) and
  108.           there can be no real-time section.  Either the block or character
  109.           special device can be supplied.  An XLV logical volume with a log
  110.           subvolume cannot be supplied here.  Note that the default log in
  111.           this case is an internal log with at least 1000 blocks, actual size
  112.           depending on the filesystem block size and the directory block size.
  113.  
  114.           The ffffiiiilllleeee suboption is used to specify that the file given by the
  115.           nnnnaaaammmmeeee suboption is a regular file.  The suboption value is either 0
  116.           or 1, with 1 signifying that the file is regular.  This suboption is
  117.           used only to make a filesystem image (for instance, a miniroot
  118.           image).  If the value is omitted then 1 is assumed.
  119.  
  120.           The ssssiiiizzzzeeee suboption is used to specify the size of the data section.
  121.           This suboption is required if ----dddd ffffiiiilllleeee[[[[====1111]]]] is given.  Otherwise, it
  122.           is only needed if the filesystem should occupy less space than the
  123.           size of the special file.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))
  137.  
  138.  
  139.  
  140.           The ssssuuuunnnniiiitttt suboption is used to specify the stripe unit for a RAID
  141.           device or XLV striped volume.  The suboption value has to be
  142.           specified in 512-byte block units.  Use the ssssuuuu suboption to specify
  143.           the stripe unit size in bytes.  This suboption ensures that data
  144.           allocations will be stripe unit aligned when the current end of file
  145.           is being extended and the file size is larger than 512KB.  Also
  146.           inode allocations and the internal log will be stripe unit aligned.
  147.  
  148.           The ssssuuuu suboption is an alternative to using ssssuuuunnnniiiitttt.... The ssssuuuu suboption
  149.           is used to specify the stripe unit for a RAID device or XLV/XVM
  150.           striped volume.  The suboption value has to be specified in bytes,
  151.           (usually using the mmmm or gggg suffixes).  This value must be a multiple
  152.           of the filesystem block size.
  153.  
  154.           The sssswwwwiiiiddddtttthhhh suboption is used to specify the stripe width for a RAID
  155.           device or XLV striped volume.  The suboption value has to be
  156.           specified in 512-byte block units.  Use the sssswwww suboption to specify
  157.           the stripe width size in bytes.  This suboption is required if ----dddd
  158.           ssssuuuunnnniiiitttt has been specified and it has to be a multiple of the ----dddd ssssuuuunnnniiiitttt
  159.           suboption.  The stripe width will be the preferred iosize returned
  160.           in the stat system call.
  161.  
  162.           The sssswwww suboption is an alternative to using sssswwwwiiiiddddtttthhhh.... The sssswwww suboption
  163.           is used to specify the stripe width for a RAID device or XLV striped
  164.           volume.  The suboption value is expressed as a multiplier of the
  165.           stripe unit, usually the same as the number of stripe members in the
  166.           XLV/XVM configuration, or data disks in a RAID device.
  167.  
  168.           The uuuunnnnwwwwrrrriiiitttttttteeeennnn suboption is used to specify whether unwritten extents
  169.           are flagged as such, or not.  The suboption value is either 0 or 1,
  170.           with 1 signifying that unwritten extent flagging should occur.  If
  171.           the suboption is omitted, unwritten extent flagging is enabled.  If
  172.           unwritten extents are flagged, filesystem write performance will be
  173.           negatively affected for preallocated file extents, since extra
  174.           filesystem transactions are required to convert extent flags for the
  175.           range of the file written.  This suboption should be disabled if the
  176.           filesystem needs to be used on operating system versions which do
  177.           not support the flagging capability.
  178.  
  179.      ----iiii   Inode options.
  180.  
  181.           This option specifies the inode size of the filesystem, and other
  182.           inode allocation parameters.  The XFS inode contains a fixed-size
  183.           part and a variable-size part.  The variable-size part, whose size
  184.           is affected by this option, can contain:  directory data, for small
  185.           directories; attribute data, for small attribute sets; symbolic link
  186.           data, for small symbolic links; the extent list for the file, for
  187.           files with a small number of extents; and the root of a tree
  188.           describing the location of extents for the file, for files with a
  189.           large number of extents.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))
  203.  
  204.  
  205.  
  206.           The valid suboptions for specifying inode size are:  lllloooogggg====_v_a_l_u_e,
  207.           ppppeeeerrrrbbbblllloooocccckkkk====_v_a_l_u_e, and ssssiiiizzzzeeee====_v_a_l_u_e; only one can be supplied.  The inode
  208.           size is specified either as a base two logarithm value with lllloooogggg====, in
  209.           bytes with ssssiiiizzzzeeee====, or as the number fitting in a filesystem block
  210.           with ppppeeeerrrrbbbblllloooocccckkkk====.  The mininum (and default) value is 256 bytes.  The
  211.           maximum value is 2048 (2 KB) subject to the restriction that the
  212.           inode size cannot exceed one half of the filesystem block size.
  213.  
  214.           The option mmmmaaaaxxxxppppcccctttt====_v_a_l_u_e specifies the maximum percentage of space in
  215.           the filesystem that can be allocated to inodes.  The default value
  216.           is 25%.  Setting the value to 0 means that essentially all of the
  217.           filesystem can become inode blocks.
  218.  
  219.           The option aaaalllliiiiggggnnnn[[[[====_v_a_l_u_e]]]] is used to specify that inode allocation is
  220.           or is not aligned.  The value is either 0 or 1, with 1 signifying
  221.           that inodes are allocated aligned.  If the value is omitted, 1 is
  222.           assumed.  The default is that inodes are aligned.  Aligned inode
  223.           access is normally more efficient than unaligned access; alignment
  224.           must be established at the time the filesystem is created, since
  225.           inodes are allocated at that time.  This option can be used to turn
  226.           off inode alignment when the filesystem needs to be mountable by a
  227.           version of IRIX that does not have the inode alignment feature (any
  228.           release of IRIX before 6.2, and IRIX 6.2 without XFS patches).
  229.  
  230.      ----llll   Log section options.
  231.  
  232.           These options specify the location, size, and other parameters of
  233.           the log section of the filesystem.  The valid suboptions are:
  234.           iiiinnnntttteeeerrrrnnnnaaaallll[[[[====_v_a_l_u_e]]]] and ssssiiiizzzzeeee====_v_a_l_u_e.
  235.  
  236.           The iiiinnnntttteeeerrrrnnnnaaaallll suboption is used to specify that the log section is a
  237.           piece of the data section instead of being a separate part of an XLV
  238.           logical volume.  The suboption value is either 0 or 1, with 1
  239.           signifying that the log is internal.  If the value is omitted, 1 is
  240.           assumed.
  241.  
  242.           The ssssiiiizzzzeeee suboption is used to specify the size of the log section.
  243.           This suboption is required if ----llll iiiinnnntttteeeerrrrnnnnaaaallll[[[[====1111]]]] is given.  Otherwise,
  244.           it is only needed if the log section of the filesystem should occupy
  245.           less space than the size of the special file.  The size is specified
  246.           in bytes or blocks, with a bbbb suffix meaning multiplication by the
  247.           filesystem block size, as described above.  The overriding minimum
  248.           value for size is 512 blocks.  With some combinations of filesystem
  249.           block size, inode size, and directory block size, the minimum log
  250.           size is larger than 512 blocks.
  251.  
  252.           For a filesystem which is not contained in an XLV logical volume
  253.           with a log subvolume, the default is to make an internal log 1000
  254.           blocks long, or longer with some combinations of filesystem block
  255.           size, inode size, and directory block size.
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))
  269.  
  270.  
  271.  
  272.           For a filesystem which is contained in a XLV striped logical volume,
  273.           the default internal log size is rounded up to a multiple of the
  274.           stripe unit size.  In this case, the user specified ssssiiiizzzzeeee value must
  275.           be a multiple of the stripe unit size.
  276.  
  277.      ----nnnn   Naming options.
  278.  
  279.           These options specify the version and size parameters for the naming
  280.           (directory) area of the filesystem.  The valid suboptions are:
  281.           lllloooogggg====_v_a_l_u_e, ssssiiiizzzzeeee====_v_a_l_u_e, and vvvveeeerrrrssssiiiioooonnnn====_v_a_l_u_e.  The naming (directory)
  282.           version is 1 or 2, defaulting to 2 if unspecified.  With version 2
  283.           directories, the directory block size can be any power of 2 size
  284.           from the filesystem block size up to 65536.  The block size is
  285.           specified either as a base two logarithm value with lllloooogggg====, or in
  286.           bytes with ssssiiiizzzzeeee====.  The default size value for version 2 directories
  287.           is 4096 bytes (4 KB), unless the filesystem block size is larger
  288.           than 4096, in which case the default value is the filesystem block
  289.           size.  For version 1 directories the block size is the same as the
  290.           filesystem block size.
  291.  
  292.           Note that you must use V1 directories in the rare case that your
  293.           filesystems are expected to be moved to computers running IRIX
  294.           releases older than IRIX 6.5.5.  Such older releases of IRIX will
  295.           not be able to mount a filesystem created with V2 directories and
  296.           will issue the message "Wrong filesystem type:  xfs" when a mount is
  297.           attempted.
  298.  
  299.      ----pppp _p_r_o_t_o_f_i_l_e
  300.           If the optional ----pppp _p_r_o_t_o_f_i_l_e argument is given, _m_k_f_s__x_f_s uses
  301.           _p_r_o_t_o_f_i_l_e as a prototype file and takes its directions from that
  302.           file.  The blocks and inodes specifiers in the _p_r_o_t_o_f_i_l_e are
  303.           provided for backwards compatibility, but are otherwise unused.  The
  304.           prototype file contains tokens separated by spaces or newlines.  A
  305.           sample prototype specification follows (line numbers have been added
  306.           to aid in the explanation):
  307.  
  308.                1       /stand/_d_i_s_k_b_o_o_t
  309.                2       4872 110
  310.                3       d--777 3 1
  311.                4       usr     d--777 3 1
  312.                5       sh      ---755 3 1 /bin/sh
  313.                6       ken     d--755 6 1
  314.                7               $
  315.                8       b0      b--644 3 1 0 0
  316.                9       c0      c--644 3 1 0 0
  317.                10      fifo    p--644 3 1
  318.                11      slink   l--644 3 1 /a/symbolic/link
  319.                12      :  This is a comment line
  320.                13      $
  321.                14      $
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))
  335.  
  336.  
  337.  
  338.           Line 1 is a dummy string.  (It was formerly the bootfilename.)  It
  339.           is present for backward compatibility; boot blocks are not used on
  340.           SGI systems.
  341.  
  342.           Note that some string of characters must be present as the first
  343.           line of the proto file to cause it to be parsed correctly; the value
  344.           of this string is immaterial since it is ignored.
  345.  
  346.           Line 2 contains two numeric values (formerly the numbers of blocks
  347.           and inodes).  These are also merely for backward compatibility: two
  348.           numeric values must appear at this point for the proto file to be
  349.           correctly parsed, but their values are immaterial since they are
  350.           ignored.
  351.  
  352.           Lines 3-11 tell _m_k_f_s__x_f_s about files and directories to be included
  353.           in this filesystem.  Line 3 specifies the root directory.  Lines 4-6
  354.           and 8-10 specifies other directories and files.  Note the special
  355.           symbolic link syntax on line 11.
  356.  
  357.           The $$$$ on line 7 tells _m_k_f_s__x_f_s to end the branch of the filesystem
  358.           it is on, and continue from the next higher directory.  It must be
  359.           the last character on a line.  The colon on line 12 introduces a
  360.           comment; all characters up until the following newline are ignored.
  361.           Note that this means you cannot have a file in a prototype file
  362.           whose name contains a colon.  The $$$$ on lines 13 and 14 end the
  363.           process, since no additional specifications follow.
  364.  
  365.           File specifications give the mode, the user ID, the group ID, and
  366.           the initial contents of the file.  Valid syntax for the contents
  367.           field depends on the first character of the mode.
  368.  
  369.           The mode for a file is specified by a 6-character string.  The first
  370.           character specifies the type of the file.  The character range is
  371.           ----bbbbccccddddppppllll to specify regular, block special, character special,
  372.           directory files, named pipes (fifos), and symbolic links,
  373.           respectively.  The second character of the mode is either uuuu or ---- to
  374.           specify setuserID mode or not.  The third is gggg or ---- for the
  375.           setgroupID mode.  The rest of the mode is a three digit octal number
  376.           giving the owner, group, and other read, write, execute permissions
  377.           (see _c_h_m_o_d(1)).
  378.  
  379.           Two decimal number tokens come after the mode; they specify the user
  380.           and group IDs of the owner of the file.
  381.  
  382.           If the file is a regular file, the next token of the specification
  383.           can be a pathname from which the contents and size are copied.  If
  384.           the file is a block or character special file, two decimal numbers
  385.           follow that give the major and minor device numbers.  If the file is
  386.           a symbolic link, the next token of the specification is used as the
  387.           contents of the link.  If the file is a directory, _m_k_f_s__x_f_s makes
  388.           the entries ....  and ........ and then reads a list of names and
  389.           (recursively) file specifications for the entries in the directory.
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))                                                      mmmmkkkkffffssss____xxxxffffssss((((1111MMMM))))
  401.  
  402.  
  403.  
  404.           As noted above, the scan is terminated with the token $$$$.
  405.  
  406.      ----qqqq   Quiet option.
  407.  
  408.           Normally _m_k_f_s__x_f_s prints the parameters of the filesystem to be
  409.           constructed; the ----qqqq flag suppresses this.
  410.  
  411.      ----rrrr   Real-time section options.
  412.  
  413.           These options specify the location, size, and other parameters of
  414.           the real-time section of the filesystem.  The valid suboptions are:
  415.           eeeexxxxttttssssiiiizzzzeeee====_v_a_l_u_e and ssssiiiizzzzeeee====_v_a_l_u_e.
  416.  
  417.           The eeeexxxxttttssssiiiizzzzeeee suboption is used to specify the size of the blocks in
  418.           the real-time section of the filesystem.  This size must be a
  419.           multiple of the filesystem block size.  The minimum allowed value is
  420.           the filesystem block size or 4 KB (whichever is larger); the default
  421.           value is the stripe width for striped volumes or 64 KB for non-
  422.           striped volumes; the maximum allowed value is 1 GB.  The real-time
  423.           extent size should be carefully chosen to match the parameters of
  424.           the physical media used.
  425.  
  426.           The ssssiiiizzzzeeee suboption is used to specify the size of the real-time
  427.           section.  This suboption is only needed if the real-time section of
  428.           the filesystem should occupy less space than the size of the XLV
  429.           real-time subvolume.
  430.  
  431.      ----CCCC   Disable overlapping partition/volume checks.
  432.  
  433.           By default _m_k_f_s__x_f_s checks to see if the destination partition or
  434.           logical volume overlaps any mounted or reserved partitions in the
  435.           system.  If an overlap or mount conflict is found, the user will be
  436.           notified and prevented from potentially corrupting the existing
  437.           data.  For systems with a large number of disks, this additional
  438.           checking may add noticable overhead to the command's execution time.
  439.           For situations where command performance is necessary, this switch
  440.           may be used to disable the safeguards.  Due to the potential for
  441.           user-error causing corrupted filesystems or other on-disk data
  442.           corruption, we strongly discourage use of this switch in normal
  443.           operation.
  444.  
  445. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  446.      mkfs(1M), mkfs_efs(1M).
  447.  
  448. BBBBUUUUGGGGSSSS
  449.      With a prototype file, it is not possible to specify hard links.
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.